<?php  
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

defined('_JEXEC') or die('Retricted Access');
 global $mainframe;
 JHTML::_('behavior.tooltip');
 $tab = JRequest::getVar('tab', 'general');
 if($tab=='') $tab = 'general';
 $paramsField = JRequest::getVar( $tab, null, 'post', 'array' );
 $save_error = JRequest::getVar('save_error',0);
 $configs = new JConfig(); 
?>
<style type="text/css">
	td.key{
		font-weight:normal !important;
		text-align:left !important;
	}
	td.master{
		font-weight:bold !important;
	}
</style>
<form action="index.php" method="post" name="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<?php echo $this->getTabs();?>
	</fieldset>	
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'General Config' ); ?></legend>		
		<table class="admintable" width="100%">
		<tbody>		
			<?php if(isset($this->themes) && $this->themes){?>
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Themes and Layout' ); ?>
				</td>				
			</tr>
			<tr>
				<td class="key ">
					<label for="theme"><?php echo JText::_( "Default Theme" ); ?>: <sup><font color="red" style="font-weight: bold;"><?php echo JText::_('NEW!')?></font></sup> </label>
				</td>
				<td style="text-transform: capitalize">
					<?php echo $this->themes?>
				</td>
			</tr>
			<?php }?>	
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Time and Date' ); ?>
				</td>				
			</tr>
			
			<tr>
				<td class="key">
					<label for="format_date"><?php echo JText::_( 'Display Date Format' ); ?></label>:
				</td>
				<td width="79%">
					<input type="text" name="general[format_date]" value="<?php echo $save_error?$paramsField['format_date']:$this->params->get('format_date');?>" id="format_date"  size="50">
				</td>
			</tr>
				
			<tr>
				<td class="key ">
					<label for="general[posts_show_published_date]"><?php echo JText::_( "Enable TimeStamp?" ); ?></label>
					<br/>
					<small>( <?php echo JText::_('Eg. 10d ago. Apply for List of Jobs Only')?> )</small>
				</td>
				<td>
					<?php 
						$posts_show_published_date = $this->params->get('posts_show_published_date')?1:0;
						if ($save_error)
							$posts_show_published_date = $paramsField['posts_show_published_date'];
					?>
					<?php echo JHTML::_('select.booleanlist', 'general[posts_show_published_date]', '', $posts_show_published_date);?>					
				</td>
			</tr>
			
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Upload' ); ?>
				</td>				
			</tr>
			<tr>
				<td class="key">
					<label for="upload_folder"><?php echo JText::_("Upload folder"); ?></label>
				</td>
				<td>
					<input type="text" name="general[upload_folder]" value="<?php echo $save_error?$paramsField['upload_folder']:$this->params->get('upload_folder',DS.'images'.DS.'stories'.DS.'jbuploads'); ?>" id="upload_folder" size="90"/> 
				</td>
			</tr>
			<tr>
				
				<td class="key">
					<label for="allowed_ext"><?php echo JText::_( 'File Uploads - Allowed extensions' ); ?>:</label>
				</td>
				<td>
					<small><?php echo JText::_( 'Enter the file types that you would like to allow, separated by commas' ); ?>:</small><br />
					<img border="0" alt="Tooltip" src="<?php echo JURI::base().'components/com_jajobboard/images/warning.png';?>"/>
					<font  color="Red"><i><?php echo JText::_( 'Allowed extend' ); ?>: 
						<?php
							$allowed_extend = JobBoardConstant::getAllowedExtend();
							echo implode(', ',$allowed_extend);
						?>
					</i></font>
					<br/>
					<textarea cols="50" rows="4" name="general[allowed_ext]"><?php echo $save_error?$paramsField['allowed_ext']:$this->params->get('allowed_ext');?></textarea><br />
					<small><?php echo JText::_( 'eg' ); ?>: doc, docx, pdf, wps, hwp, txt, rtf, wri, zip, rar, jpg, gif, bmp</small>

				</td>
			</tr>
			<tr>
				<td class="key">
					<label for="allowed_img"><?php echo JText::_( 'Image Uploads - Allowed extensions' ); ?>:</label>
				</td>
				<td>
					<small><?php echo JText::_( 'Enter the image types that you would like to allow, seperated by commas' ); ?>:</small><br />
					<img border="0" alt="Tooltip" src="<?php echo JURI::base().'components/com_jajobboard/images/warning.png';?>"/>
					<font  color="Red"><i><?php echo JText::_( 'Allowed extend' ); ?>: 
						<?php
							$allowed_extend = JobBoardConstant::getAllowedExtend();
							echo implode(', ',$allowed_extend);
						?>
					</i></font>
					<br/>
					<textarea cols="50" rows="4" name="general[allowed_img]"><?php echo $save_error?$paramsField['allowed_img']:$this->params->get('allowed_img');?></textarea><br />
					<small><?php echo JText::_( 'eg' ); ?>: jpg, jpeg, gif, png, bmp</small>
				</td>
			</tr>
			<tr>
				<td class="key">
					<label for="max_upload_bytes"><?php echo JText::_( 'File Uploads - Maximum Size' ); ?>:</label>
				</td>
				<td>
					<input type="text" name="general[max_upload_bytes]" value="<?php echo $save_error?$paramsField['max_upload_bytes']:$this->params->get('max_upload_bytes');?>" id="max_upload_bytes"  size="50">
					<small><?php echo '('.JText::_( 'Enter the max size in mega bytes' ).' - MB)'; ?> </small>
				</td>
			</tr>
			
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Using Google Map' ); ?>
				</td>				
			</tr>
			<tr>
				<td colspan="2">
					<?php echo JText::_( 'Config How to get location data to show Job/ Employer/ JobSeeker location in Google Map with <a href="http://www.joomlart.com/joomla/extensions/ja-google-map" target="_blank">JA Map</a> plugin' ); ?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<span class="editlinktip hasTip" title="<?php echo JText::_( 'In Job details' );?>">
					<?php echo JText::_("In Job details");?>
					</span>
				</td>
				<td>
					<?php
						echo $this->getFields("ja_jobs", "general[map_ja_jobs]", $this->params->get('map_ja_jobs', "location_id") );
					?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<span class="editlinktip hasTip" title="<?php echo JText::_( 'In Profile details' );?>">
					<?php echo JText::_("In Profile details");?>
					</span>
				</td>
				<td>
					<?php
						echo $this->getFields("ja_profiles", "general[map_ja_profiles]", $this->params->get('map_ja_profiles', "address") );
					?>
				</td>
			</tr>
			<tr>
				<td class="key">
					<span class="editlinktip hasTip" title="<?php echo JText::_( 'In Resume details' );?>">
					<?php echo JText::_("In Resume details");?>
					</span>
				</td>
				<td>
					<?php
						echo $this->getFields("ja_resumes", "general[map_ja_resumes]", $this->params->get('map_ja_resumes', "address") );
					?>
				</td>
			</tr>
			
			<tr>
				<td colspan="2" class="key master" style="text-align:left; font-size:12px;">
					<?php echo JText::_( 'Copyright' ); ?>
				</td>				
			</tr>
			<tr>
				<td class="key">
					<span class="editlinktip hasTip" title="<?php echo JText::_( 'Hide the JA Job Board Copyright' );?>">
					<?php echo JText::_("Hide the JA Job Board Copyright");?>
					</span>
				</td>
				<td>
					<input type="radio"<?php if(!$this->params->get('is_turn_off_copyright', 0))echo 'checked' ?>  name="general[is_turn_off_copyright]"  value='0'><?php echo JText::_('No')?>
					<input type="radio"<?php if($this->params->get('is_turn_off_copyright', 0)) echo 'checked' ?> name="general[is_turn_off_copyright]"  value='1'><?php echo JText::_('Yes')?>
				</td>
			</tr>		
		</tbody>
		</table>
	</fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="<?php echo JBCOMNAME; ?>" />
<input type="hidden" name="view" value="jaconfiguration" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="tab" value="<?php echo $this->tab; ?>" />
<input type="hidden" name="cid" value="<?php echo $this->cid; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>	
 </form>
